<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" href="/css/pager.css" type="text/css"></link>
	<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="/js/pageView.js"></script> 
	<script src="/js/jquery.KinSlideshow-1.2.1.min.js" type="text/javascript"></script>
	
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <script type="text/javascript">
	    //打开页面随机选择 切换方式（方向）,怕增大KinSlideshow.js文件 就没把随机切换写到里面。
		//使用时如有需要随机自己写在前面是一样的。而且还可以只固定随机切换哪几种。
		
		var moveStyle
		var rand =parseInt(Math.random()*4)
		switch(rand){
			case 0:	moveStyle="left" ;break;
			case 1:	moveStyle="right" ;break;
			case 2:	moveStyle="down" ;break;
			case 3:	moveStyle="up" ;break;
		}
		$(function(){
			$("#KinSlideshow1").KinSlideshow({moveStyle:moveStyle});
			
		})
	
		// 分页
		function pageNoId(pageNo) {
			var businessId = $("#businessId").val();
			//alert(pageNo);
			//alert(businessId);	 
			window.location.href ="/business.do?method=view&pageNo="+pageNo+"&businessId="+businessId;
		}		
			 
		</script>
  </head>
  
  <body>
  <%@ include file="/hader.jsp"%> 
   <div class="wrapper">
  	<input type="hidden" id="businessId" name="businessId" value="${businessId}"/>
	<div class="banner fl">
		<div id="KinSlideshow1" style="visibility:hidden;"> 
			<a href="#"><img src="images/banner_01.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_02.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_03.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_04.jpg" alt="" width="724" height="220" /></a> 
		</div>
	</div>
	<div class="banner_right fr"> <a href="#"><img src="images/index_05.jpg" alt="" title="手机版" /></a><a href="#"><img src="images/index_06.jpg" alt="" title="HD版" /></a> </div>
	<div class="cb"></div>
	<div class="index_px">
		<div class="page fr">
		
		</div>
		<div class="cb"></div>
		<div class="cb"></div>
	</div>
	<div class="huodong_left fl">
		<div class="huodong">
			<div class="t">商家列表</div>
			<div class="cc">
				<div class="mo_wp">
					<div class="mo_title">
						<div class="mo_title_l">KTV(${bz1})</div>
					</div>
					<div class="mo_con">
					<c:forEach items="${businessinfolist1}" var="lf" >
						<li><a href="/business.do?method=view&businessId=${lf.id}">${lf.businessName}</a></li>
					</c:forEach>
					</div>
				</div>
				<div class="mo_wp">
					<div class="mo_title">
						<div class="mo_title_l">酒吧(${bz2})</div>
					</div>
					<div class="mo_con">
						<c:forEach items="${businessinfolist2}" var="ls" >
							<li><a href="/business.do?method=view&businessId=${ls.id}">${ls.businessName}</a></li>
						</c:forEach>
					</div>
				</div>
				<div class="mo_wp">
					<div class="mo_title">
						<div class="mo_title_l">别墅聚会(${bz3})</div>
					</div>
					<div class="mo_con">
						<c:forEach items="${businessinfolist3}" var="bl" >
							<li><a href="/business.do?method=view&businessId=${bl.id}">${bl.businessName}</a></li>
						</c:forEach>
					</div>
				</div>
				<div class="cb"></div>
			</div>
			<div><img src="images/huodong_03.jpg" alt="" /></div>
		</div>
	</div>
	<div class="shangjia fr">
		<div class="t">${binfo.businessName}</div>
		<div class="left fl">
			<c:forEach var="i" items="${pager.resultList}">
				<div class="list">
					<div class="top"> <a href="#"><img src="images/packageImg/${i.imgFirst}" alt="" class="img" /></a>
						<p>市场价:<s>${i.price}元</s><br />
							建议团体消费人数：${i.packageMaxPeople}人</p>
					</div>
					<div class="middle"><font><a href="/business.do?method=jumpForActive&id=${i.id}"><img src="images/huodong_15.jpg" alt="" /></a></font>¥<span>${i.zhekou} </span></div>
					<div class="cb"></div>
					<div class="bottom"><!-- <span>【沙河口区】</span> -->${i.packageName}</div>
				</div>
			</c:forEach>
		</div>
		<div class="list1">
			<div class="map">${binfo.mapurl}</div>
			<div class="mapview"><a href="#">查看完整地图</a></div>
			地址：${binfo.businessAddress}<br />
			营业时间：${binfo.beginTime}-${binfo.endTime}<br />
			电话：${binfo.businessTel}<br />
			交通指南：${binfo.busInformation}<br />
			简介：${binfo.introduce}
			<p> 
			<c:forEach items ="${bimg}" var="b">
				<img src="/images/businessImg/${b.imgname}" alt="" width="185" height="123" />
			</c:forEach>
			</p>
		</div>
		<div class="cb"></div>
	</div>
	<div class="cb"></div>
	<div class="cb"></div>
	
</div>	
<div class="index_px">
		<div class="page fr">
		<div id="pager" style="width: 310px;float:right;margin:0px 300px 0px 0px;">
			<script type="text/javascript">
		            var pager = new PagerView('pager');
		            //共计多少条信息
		            pager.itemCount = ${pager.rowCount};
					//共计多少页
					pager.pageCount=${pager.pageCount};
					//每页显示记录数
					pager.size =${pager.pageSize};
					//当前页码, 从1开始
					pager.index =${pager.pageNo} ;
					//alert(pager.index);
					pager.render();
				</script>
			</div>
		</div>
		<div class="cb"></div>
		<div class="cb"></div>
	</div>
	<%@ include file="/footer.html"%> 
  </body>
</html>
